﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace YmtAuth.Domain.Repository
{
    public interface IRepository<T> where T : class, IEntity
    {
        T FindOne(Expression<Func<T, bool>> exp);
        T FindOne(Expression<Func<T, bool>> exp, string tb, string db);
        IEnumerable<T> FindList(Expression<Func<T, bool>> exp);
        IEnumerable<T> FindList(Expression<Func<T, bool>> exp, string tb, string db);
        void Insert(params T[] val);
        void Insert(string tb, string db, params T[] val);
        void InsertAsync(params T[] val);
        void InsertAsync(string tb, string db, params T[] val);
    }
}
